package com.sloera.nacos.controller;

import com.sloera.nacos.client.ProviderClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class ConsumerController {

    @Autowired
    private ProviderClient providerClient;
    @GetMapping("service")
    public String service() {
        log.info("消费者调用");
        String result = providerClient.service("bbb");
        log.info("消费者调用结果.result={}",result);
        return "消费者调用结果.result="+result;
    }
}
